from sklearn.linear_model import LinearRegression


x = [
    [80, 86],
    [82, 86],
    [85, 78],
    [90, 90],
    [86, 82],
    [82, 90],
    [78, 80],
    [92, 94],
]

y = [84.2, 80.6, 80.1, 90, 83.2, 87.6, 79.4, 93.4]


estimator = LinearRegression()

estimator.fit(x, y)
# 查看系数值
coef = estimator.coef_
print('系数是:\n', coef)

# 预测
print('预测值是:\n', estimator.predict([[80, 100]]))



